#include "stdio.h"
#include "gd32f4xx_it.h"

void NMI_Handler(void) {
    printf("NMI_Handler\r\n");
    while(1);
}

void HardFault_Handler(void) {
    printf("HardFault_Handler\r\n");
    while(1);
}

void MemManage_Handler(void) {
    printf("MemManage_Handler\r\n");
    
    uint32_t cfsr_val = (SCB->CFSR);
    
    
    while(1);
}

void BusFault_Handler(void) {
    printf("BusFault_Handler\r\n");
    uint32_t cfsr_val = (SCB->CFSR);

    
    while(1);
}

void UsageFault_Handler(void) {
    printf("UsageFault_Handler\r\n");
    
    uint32_t cfsr_val = (SCB->CFSR);
    
    while(1);
}